{extend name="public/base" /}

{block name="title"}<title>{if condition="$data"}{$Think.lang.edit}{else /}{$Think.lang.create}{/if}</title>{/block}

{block name="pjax_container"}
<section class="content-header">
    <h1>{:isset($data.id)?"修改":"添加"}信息</h1>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> {:isset($data.id)?"修改":"添加"}信息</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="" onsubmit="return false" >
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab1" data-toggle="tab">{$Think.lang.base_param}</a></li>
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm" style="padding:10px 2px;"><i class="fa fa-list"></i> {$Think.lang.back}</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">
                            <input type="hidden" name="id" value="{$data.id}" />
                            <div class="form-group">
                                <label class="col-sm-2 control-label">{$Think.lang.name}</label>
                                <div class="col-sm-7"><textarea class="form-control" name="info" placeholder="{$Think.lang.info}">{$data.info|htmlspecialchars_decode}</textarea></div>
                            </div>
                        </div>
                    </div>
                    <div class="box-footer">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-7">
                            <div class="btn-group pull-right">
                                <button type="submit" class="btn btn-info pull-right submits" data-loading-text="&lt;i class='fa fa-spinner fa-spin '&gt;&lt;/i&gt; {$Think.lang.submit}">{$Think.lang.submit}</button>
                            </div>
                            <div class="btn-group pull-left">
                                <button type="reset" class="btn btn-warning">{$Think.lang.reset}</button>
                            </div>
                        </div>
                    </div>


                </div>
            </form>
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary mod-sub">确定</button>
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal -->
            </div>
        </div>
    </div>
</section>
<script type="text/javascript">
$(function(){
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
        checkboxClass: 'icheckbox_minimal-blue',
        radioClass: 'iradio_minimal-blue'
    });
    
    /*ajax页面加载icheck，有该控件的页面才需要*/
    $(".select2").select2({language:"zh-CN"});
    
    {if condition=" $rest_login == 1 "}
    restlogin('{$rest_login_info}');   //登录超时
    {/if}
    $('.transfer-span').click(function(){
        var auth = "{$group_id}";
        if(auth != '1'){
            return false;
        }
    });
        KindEditor.create('textarea[name="info"]',{
            width : '100%',   //宽度
            height : '320px',   //高度
            resizeType : '0',   //禁止拖动
            allowFileManager : true,   //允许对上传图片进行管理
            uploadJson : '{:url("Uploads/upload")}',   //文件上传地址
            fileManagerJson : '{:url("Uploads/manager")}',   //文件管理地址
            urlType : 'domain',   //带域名的路径
            formatUploadUrl: true,   //自动格式化上传后的URL
            autoHeightMode: false,   //开启自动高度模式
            afterBlur: function () { this.sync(); }   //同步编辑器数据
        });


})
</script>
{/block}